#安装nodejs
curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
yum install -y nodejs
#安装yarn
npm install -g yarn
yarn
#安装nginx
sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
sudo yum install -y nginx
sudo systemctl start nginx.service
sudo systemctl enable nginx.service
# 编译文件
yarn build:dev
# 复制文件进入
\cp -f nginx.conf /etc/nginx/conf.d/default.conf
\cp -rfp build/* /usr/share/nginx/html
